<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui" >
    <h:head>
        <title>Login</title>
    </h:head>
    <h:body>
        <h:outputStylesheet name="default.css" />
        <h:form>
            <p:panel id="panel" header="login" style="margin-bottom:10px;width: 800px">  
                <p:messages id="messages" globalOnly="true" /> 
                <h:panelGrid columns="3">  

                    <p:outputLabel for="username" value="Username: " />  
                    <p:inputText id="username" value="#{loginBean.user.userName}" required="true" />  
                    <p:message for="username"/>

                    <p:outputLabel for="password" value="Password: " />  
                    <p:inputText id="password" value="#{loginBean.user.password}" required="true" />  
                    <p:message for="password"/>

                </h:panelGrid>

            </p:panel> 

            <p:commandButton value="login" update="panel" action="#{loginBean.login()}"/>
            <p:commandButton value="New account" action="#{loginBean.toNewTwitterer()}" immediate="true"/>
        </h:form>


    </h:body> 
</html>
